

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The headers module &mdash; pyamp v1.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pyamp v1.2 documentation" href="../index.html" />
    <link rel="up" title="The http module" href="mod_pyamp_web_http.html" />
    <link rel="next" title="The page module" href="pyamp_web_http_page.html" />
    <link rel="prev" title="The requests module" href="pyamp_web_http_requests.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_web_http_page.html" title="The page module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pyamp_web_http_requests.html" title="The requests module"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_web.html" >The web module</a> &raquo;</li>
          <li><a href="mod_pyamp_web_http.html" accesskey="U">The http module</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pyamp.web.http.headers">
<span id="the-headers-module"></span><h1>The headers module<a class="headerlink" href="#module-pyamp.web.http.headers" title="Permalink to this headline">¶</a></h1>
<p>The headers module contains a class which provides the ability
to create a specific HTTP header.</p>
<div class="section" id="the-header-class">
<h2>The Header class<a class="headerlink" href="#the-header-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-548ee71d22e0a44fe71c5c54903fc4ede42d1018.png" alt="Inheritance diagram of pyamp.web.http.headers.Header" usemap="#inheritance90a7109a2e" class="inheritance"/>
<map id="inheritance90a7109a2e" name="inheritance90a7109a2e">
<area shape="rect" href="../web.html#pyamp.web.http.headers.Header" title="pyamp.web.http.headers.Header" alt="" coords="5,7,237,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.web.http.headers.Header">
<em class="property">class </em><tt class="descclassname">pyamp.web.http.headers.</tt><tt class="descname">Header</tt><big>(</big><em>identifier</em>, <em>value</em><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header" title="Permalink to this definition">¶</a></dt>
<dd><p>The Header class provides the ability to create a specific
HTTP header.</p>
<ul class="simple">
<li>identifier &#8211; The header identifier</li>
<li>value &#8211; The value for the header</li>
</ul>
<dl class="classmethod">
<dt id="pyamp.web.http.headers.Header.contentType">
<em class="property">classmethod </em><tt class="descname">contentType</tt><big>(</big><em>contentType</em><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.contentType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.contentType" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a content type header.</p>
<ul class="simple">
<li>contentType &#8211; The type of content</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.web.http.headers.Header.getId">
<tt class="descname">getId</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.getId"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.getId" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the ID for this header.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.web.http.headers.Header.getOperatingSystem">
<em class="property">classmethod </em><tt class="descname">getOperatingSystem</tt><big>(</big><em>headers</em><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.getOperatingSystem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.getOperatingSystem" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the operating system from the given headers.</p>
<ul class="simple">
<li>headers &#8211; The headers</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.web.http.headers.Header.getValue">
<tt class="descname">getValue</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.getValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.getValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the value for this header.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.web.http.headers.Header.jsonContent">
<em class="property">classmethod </em><tt class="descname">jsonContent</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.jsonContent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.jsonContent" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a JSON content type header.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.web.http.headers.Header.location">
<em class="property">classmethod </em><tt class="descname">location</tt><big>(</big><em>location</em><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.location"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.location" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a location header.</p>
<ul class="simple">
<li>location &#8211; The location</li>
</ul>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.web.http.headers.Header.textHtmlContent">
<em class="property">classmethod </em><tt class="descname">textHtmlContent</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/web/http/headers.html#Header.textHtmlContent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.web.http.headers.Header.textHtmlContent" title="Permalink to this definition">¶</a></dt>
<dd><p>Create an text/html content type header.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-contenttypes-class">
<h2>The ContentTypes class<a class="headerlink" href="#the-contenttypes-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-5c4c182d41126d709a5928f55b7c7cd5053d8942.png" alt="Inheritance diagram of pyamp.web.http.headers.ContentTypes" usemap="#inheritancedadaf9d2e1" class="inheritance"/>
<map id="inheritancedadaf9d2e1" name="inheritancedadaf9d2e1">
<area shape="rect" href="../web.html#pyamp.web.http.constants.ContentTypes" title="pyamp.web.http.constants.ContentTypes" alt="" coords="5,7,285,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.web.http.headers.ContentTypes">
<em class="property">class </em><tt class="descclassname">pyamp.web.http.headers.</tt><tt class="descname">ContentTypes</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes" title="Permalink to this definition">¶</a></dt>
<dd><p>The ContentTypes class contains constants pertaining to
different types of content.</p>
<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Bmp">
<tt class="descname">Bmp</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Bmp" title="Permalink to this definition">¶</a></dt>
<dd><p>A BMP image content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Css">
<tt class="descname">Css</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Css" title="Permalink to this definition">¶</a></dt>
<dd><p>CSS content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Gif">
<tt class="descname">Gif</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Gif" title="Permalink to this definition">¶</a></dt>
<dd><p>A GIF image content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Ico">
<tt class="descname">Ico</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Ico" title="Permalink to this definition">¶</a></dt>
<dd><p>An ICO image content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.JavaScript">
<tt class="descname">JavaScript</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.JavaScript" title="Permalink to this definition">¶</a></dt>
<dd><p>JavaScript content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Json">
<tt class="descname">Json</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Json" title="Permalink to this definition">¶</a></dt>
<dd><p>JSON content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.Png">
<tt class="descname">Png</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.Png" title="Permalink to this definition">¶</a></dt>
<dd><p>An PNG image content.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.ContentTypes.TextHtml">
<tt class="descname">TextHtml</tt><a class="headerlink" href="#pyamp.web.http.headers.ContentTypes.TextHtml" title="Permalink to this definition">¶</a></dt>
<dd><p>Standard text HTML content.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-os-class">
<h2>The OS class<a class="headerlink" href="#the-os-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-b6c5300e47f7a5c3b92ea89e28ea1e23989584f5.png" alt="Inheritance diagram of pyamp.web.http.headers.OS" usemap="#inheritance6d63a01d82" class="inheritance"/>
<map id="inheritance6d63a01d82" name="inheritance6d63a01d82">
<area shape="rect" href="../web.html#pyamp.web.http.constants.OperatingSystems" title="pyamp.web.http.constants.OperatingSystems" alt="" coords="5,7,320,33"/>
</map>
</p>
<dl class="attribute">
<dt id="pyamp.web.http.headers.OS">
<tt class="descclassname">pyamp.web.http.headers.</tt><tt class="descname">OS</tt><a class="headerlink" href="#pyamp.web.http.headers.OS" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">OperatingSystems</span></tt></p>
</dd></dl>

</div>
<div class="section" id="the-headerids-class">
<h2>The HeaderIds class<a class="headerlink" href="#the-headerids-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-a6734d05b46d7a34bf1a6020ea2a6f1a0fb6d42d.png" alt="Inheritance diagram of pyamp.web.http.headers.HeaderIds" usemap="#inheritance1ca009306b" class="inheritance"/>
<map id="inheritance1ca009306b" name="inheritance1ca009306b">
<area shape="rect" href="../web.html#pyamp.web.http.constants.HeaderIds" title="pyamp.web.http.constants.HeaderIds" alt="" coords="5,7,264,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.web.http.headers.HeaderIds">
<em class="property">class </em><tt class="descclassname">pyamp.web.http.headers.</tt><tt class="descname">HeaderIds</tt><a class="headerlink" href="#pyamp.web.http.headers.HeaderIds" title="Permalink to this definition">¶</a></dt>
<dd><p>The HeaderIds class contains constants pertaining to header
identifiers.</p>
<dl class="attribute">
<dt id="pyamp.web.http.headers.HeaderIds.ContentType">
<tt class="descname">ContentType</tt><a class="headerlink" href="#pyamp.web.http.headers.HeaderIds.ContentType" title="Permalink to this definition">¶</a></dt>
<dd><p>The content type header id.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.HeaderIds.Location">
<tt class="descname">Location</tt><a class="headerlink" href="#pyamp.web.http.headers.HeaderIds.Location" title="Permalink to this definition">¶</a></dt>
<dd><p>The location header id.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.web.http.headers.HeaderIds.UserAgent">
<tt class="descname">UserAgent</tt><a class="headerlink" href="#pyamp.web.http.headers.HeaderIds.UserAgent" title="Permalink to this definition">¶</a></dt>
<dd><p>The user agent header id.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The headers module</a><ul>
<li><a class="reference internal" href="#the-header-class">The Header class</a></li>
<li><a class="reference internal" href="#the-contenttypes-class">The ContentTypes class</a></li>
<li><a class="reference internal" href="#the-os-class">The OS class</a></li>
<li><a class="reference internal" href="#the-headerids-class">The HeaderIds class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="pyamp_web_http_requests.html"
                        title="previous chapter">The requests module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pyamp_web_http_page.html"
                        title="next chapter">The page module</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/_generated/pyamp_web_http_headers.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_web_http_page.html" title="The page module"
             >next</a> |</li>
        <li class="right" >
          <a href="pyamp_web_http_requests.html" title="The requests module"
             >previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_web.html" >The web module</a> &raquo;</li>
          <li><a href="mod_pyamp_web_http.html" >The http module</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>